/*
 * @Description: 
 * @Author: zoe
 * @Date: 2024-09-25 19:22:35
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-25 19:28:26
 */
import java.util.Scanner;
public class Login {
    public static void main(String[] args) {
        //创建scanner对象用于读取键盘输入
        Scanner scanner = new Scanner(System.in);
        //定义用户名和密码
        String username = "admin";
        String password = "briup";

        //提示用户输入
        System.out.println("请输入用户名：");
        String inputUsername = scanner.nextLine();

        System.out.println("请输入密码：");
        String inputPassword = scanner.nextLine();

        //验证用户名和密码是否正确
        if (username.equals(username) && password.equals(password)) {
            System.out.println("登录成功！");
        } else {
            System.out.println("登录失败，用户名或密码有误！");
        }
        //关闭scanner
        scanner.close();
    }
}
